﻿Imports Microsoft.Windows.Design.Metadata
Imports Microsoft.Windows.Design.Features

<Assembly: ProvideMetadata(GetType(Metadata))> 

Friend Class Metadata
    Implements IProvideAttributeTable

    Public ReadOnly Property AttributeTable() As AttributeTable Implements IProvideAttributeTable.AttributeTable
        Get
            Dim _builder As New AttributeTableBuilder()
            InitializeAttributes(_builder)
            Return _builder.CreateTable()
        End Get
    End Property

    Private Sub InitializeAttributes(ByVal builder As AttributeTableBuilder)
        builder.AddCallback(GetType(WPFSearchDataGrid), AddressOf AddWPFSearchDataGridAttributes)
    End Sub

    Private Sub AddWPFSearchDataGridAttributes(ByVal builder As AttributeCallbackBuilder)
        builder.AddCustomAttributes( _
            New FeatureAttribute(GetType(WPFSearchDataGridAdornerProvider)), _
            New FeatureAttribute(GetType(WPFSearchDataGridContextMenuProvider)))
    End Sub

End Class
